package com.atjyb.processschudulesimulator.pojo;


public class PCB {
    //    private List pInstructions = new ArrayList<Instructions>();//进程中的指令列表
    //进程有关信息。id name 指令集
    private Process process;
    //指向正在运行或将要运行的指令（索引）
    private int CurrentInstruction;
    //进程状态
    private String state;


    public PCB() {
    }

    public PCB(Process process, int currentInstruction) {
        this.process = process;
        CurrentInstruction = currentInstruction;
    }

    public PCB(Process process, int currentInstruction, String state) {
        this.process = process;
        CurrentInstruction = currentInstruction;
        this.state = state;
    }

    public Process getProcess() {
        return process;
    }

    public void setProcess(Process process) {
        this.process = process;
    }

    public int getCurrentInstruction() {
        return CurrentInstruction;
    }

    public void setCurrentInstruction(int currentInstruction) {
        CurrentInstruction = currentInstruction;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "PCB{" +
                "process=" + process +
                ", CurrentInstruction=" + CurrentInstruction +
                '}';
    }
}
